home *** CD-ROM | disk | FTP | other *** search
- Path: locutus.rchland.ibm.com!usenet
- From: pstaite@vnet.ibm.com
- Newsgroups: comp.lang.c++
- Subject: Re: overloading []
- Date: 19 Jan 1996 16:05:45 GMT
- Organization: IBM OS/2 Device Driver Development Rochester, MN
- Message-ID: <4dofgp$oj6@locutus.rchland.ibm.com>
- References: <4dgjbl$6i3@news1.goodnet.com> <4dh86s$bfi@locutus.rchland.ibm.com> <4djpt6$p02@clarknet.clark.net>
- Reply-To: pstaite@vnet.ibm.com
- NNTP-Posting-Host: warpone.rchland.ibm.com
- X-Newsreader: IBM NewsReader/2 v1.2
-
- In <4djpt6$p02@clarknet.clark.net>, gusty@clark.net (Harlan Messinger) writes:
- >
- >Why would you do
- >
- > foo& f(* new foo);
- >
- >followed by a delete instead of just
- >
- > foo f;
- >
- >with f disappearing when it goes out of scope?
-
- Because the original poster was dealing with a dynamically created
- (new'd) object foo. Basically he/she was looking for a way of calling
- operator[] on the dynamic foo instance. Sure, an auto foo makes more
- sense, unless of course sizeof(foo) is big and your stack small ;-)
- Then you may never want to create an auto foo...
-
-
- Phil Staite, team OS/2
- internet: pstaite@vnet.ibm.com internal: pstaite@rchland
-
-